import {getBannerlist} from "../../../util/axios"
const state={
    bannerList:[]
}
const getters={
     gettersBannerlist(state){
         return  state.bannerList
     }
}
const mutations={
    REQ_BANNER(state,payload){
        state.bannerList = payload
    }
}
const actions={

    //获取列表
   getBannerActions({commit}){
    getBannerlist().then(res=>{
        if(res.code == 200){
            let list = res.list?res.list:[];
         commit("REQ_BANNER",list)
        }
    })
   }
}


export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}